﻿@using MSWeb.Models
@model LoginViewModel
@{
    ViewBag.Title = "Logowanie";
}

<h2>@ViewBag.Title.</h2>
<div class="row">
    <div class="col-md-8">
        <section id="loginForm">
            @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
            {
                @Html.AntiForgeryToken()
                <h4>Zaloguj się podając login i hasło.</h4>
                <hr />
                @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                <div class="form-group">
                    <label for="name" class="col-lg-4">
                        E-mail:
                    </label>
                    <div class="col-lg-8">
                        @Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
                        @Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" })
                    </div>
                </div>
                <div class="form-group">
                    <label for="name" class="col-lg-4">
                        Hasło:
                    </label>
                    <div class="col-lg-8">
                        @Html.PasswordFor(m => m.Password, new { @class = "form-control" })
                        @Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" })
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <input type="submit" value="Zaloguj się" class="btn btn-default" />
                    </div>
                </div>
                @*<p>
                        @Html.ActionLink("Stwórz konto", "Register")
                    </p>*@
            }
        </section>
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}